home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / termcap.arc / TERMCAP.MAN < prev    next >
Encoding:
Text File  |  1987-10-04  |  54.1 KB  |  1,255 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15. NAME
  16.  
  17.      termcap - terminal capability data base
  18.  
  19.  
  20.  
  21. SYNOPSIS
  22.  
  23.      /etc/termcap
  24.  
  25.  
  26.  
  27. DESCRIPTION
  28.  
  29.      _✓T_✓e_✓r_✓m_✓c_✓a_✓p is a data base describing terminals, used, _✓e._✓g., by
  30.  
  31.      _✓v_✓i(1) and _✓c_✓u_✓r_✓s_✓e_✓s(3X).  Terminals are described in _✓t_✓e_✓r_✓m_✓c_✓a_✓p by
  32.  
  33.      giving a set of capabilities that they have and by describ-
  34.  
  35.      ing how operations are performed.    Padding requirements and
  36.  
  37.      initialization sequences are included in _✓t_✓e_✓r_✓m_✓c_✓a_✓p.
  38.  
  39.  
  40.  
  41.      Entries in _✓t_✓e_✓r_✓m_✓c_✓a_✓p consist of a number of `:'-separated
  42.  
  43.      fields.  The first entry for each terminal gives the names
  44.  
  45.      that are known for the terminal, separated by `|' charac-
  46.  
  47.      ters.  The first name is always two characters long and is
  48.  
  49.      used by older systems which store the terminal type in a
  50.  
  51.      16-bit word in a system-wide data base.  The second name
  52.  
  53.      given is the most common abbreviation for the terminal, the
  54.  
  55.      last name given should be a long name fully identifying the
  56.  
  57.      terminal, and all others are understood as synonyms for the
  58.  
  59.      terminal name.  All names but the first and last should be
  60.  
  61.      in lower case and contain no blanks; the last name may well
  62.  
  63.      contain upper case and blanks for readability.
  64.  
  65.  
  66.  
  67.      Terminal names (except for the last, verbose entry) should
  68.  
  69.      be chosen using the following conventions.  The particular
  70.  
  71.      piece of hardware making up the terminal should have a root
  72.  
  73.      name chosen, thus "hp2621".  This name should not contain
  74.  
  75.      hyphens.  Modes that the hardware can be in or user prefer-
  76.  
  77.      ences should be indicated by appending a hyphen and an indi-
  78.  
  79.      cator of the mode.  Therefore, a "vt100" in 132-column mode
  80.  
  81.      would be "vt100-w".  The following suffixes should be used
  82.  
  83.      where possible:
  84.  
  85.  
  86.  
  87.      Suffix   Meaning                    Example
  88.  
  89.      -w       Wide mode (more than 80 columns)        vt100-w
  90.  
  91.      -am      With automatic margins (usually default)    vt100-am
  92.  
  93.      -nam     Without automatic margins                 vt100-nam
  94.  
  95.      -_✓n       Number of lines on the screen        aaa-60
  96.  
  97.      -na      No arrow keys (leave them in local)    concept100-na
  98.  
  99.      -_✓np      Number of pages of memory                 concept100-4p
  100.  
  101.      -rv      Reverse video                concept100-rv
  102.  
  103.  
  104.  
  105. CAPABILITIES
  106.  
  107.      The characters in the _✓N_✓o_✓t_✓e_✓s field in the table have the fol-
  108.  
  109.      lowing meanings (more than one may apply to a capability):
  110.  
  111.  
  112.  
  113.      N     indicates numeric parameter(s)
  114.  
  115.      P     indicates that padding may be specified
  116.  
  117.      *     indicates that padding may be based on the number of lines affected
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125. Printed 8/14/86          1 November 1985            1
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.      o     indicates capability is obsolete
  148.  
  149.  
  150.  
  151.      "Obsolete" capabilities have no _✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o equivalents, since
  152.  
  153.      they were considered useless, or are subsumed by other capa-
  154.  
  155.      bilities.    New software should not rely on them at all.
  156.  
  157.  
  158.  
  159.      Name  Type  Notes    Description
  160.  
  161.      ae    str     (P)    End alternate character set
  162.  
  163.      AL    str     (NP*)    Add _✓n new blank lines
  164.  
  165.      al    str     (P*)    Add new blank line
  166.  
  167.      am    bool         Terminal has automatic margins
  168.  
  169.      as    str     (P)    Start alternate character set
  170.  
  171.      bc    str     (o)    Backspace if not ^H
  172.  
  173.      bl    str     (P)    Audible signal (bell)
  174.  
  175.      bs    bool  (o)    Terminal can backspace with ^H
  176.  
  177.      bt    str     (P)    Back tab
  178.  
  179.      bw    bool         le (backspace) wraps from column 0 to last column
  180.  
  181.      CC    str        Terminal settable command character in prototype
  182.  
  183.      cd    str     (P*)    Clear to end of display
  184.  
  185.      ce    str     (P)    Clear to end of line
  186.  
  187.      ch    str     (NP)    Set cursor column (horizontal position)
  188.  
  189.      cl    str     (P*)    Clear screen and home cursor
  190.  
  191.      CM    str     (NP)    Memory-relative cursor addressing
  192.  
  193.      cm    str     (NP)    Screen-relative cursor motion
  194.  
  195.      co    num        Number of columns in a line (See BUGS section below)
  196.  
  197.      cr    str     (P)    Carriage return
  198.  
  199.      cs    str     (NP)    Change scrolling region (VT100)
  200.  
  201.      ct    str     (P)    Clear all tab stops
  202.  
  203.      cv    str     (NP)    Set cursor row (vertical position)
  204.  
  205.      da    bool         Display may be retained above the screen
  206.  
  207.      dB    num     (o)    Milliseconds of bs delay needed (default 0)
  208.  
  209.      db    bool         Display may be retained below the screen
  210.  
  211.      DC    str     (NP*)    Delete _✓n characters
  212.  
  213.      dC    num     (o)    Milliseconds of cr delay needed (default 0)
  214.  
  215.      dc    str     (P*)    Delete character
  216.  
  217.      dF    num     (o)    Milliseconds of ff delay needed (default 0)
  218.  
  219.      DL    str     (NP*)    Delete _✓n lines
  220.  
  221.      dl    str     (P*)    Delete line
  222.  
  223.      dm    str        Enter delete mode
  224.  
  225.      dN    num     (o)    Milliseconds of nl delay needed (default 0)
  226.  
  227.      DO    str     (NP*)    Move cursor down _✓n lines
  228.  
  229.      do    str        Down one line
  230.  
  231.      ds    str        Disable status line
  232.  
  233.      dT    num     (o)    Milliseconds of horizontal tab delay needed (default 0)
  234.  
  235.      dV    num     (o)    Milliseconds of vertical tab delay needed (default 0)
  236.  
  237.      ec    str     (NP)    Erase _✓n characters
  238.  
  239.      ed    str        End delete mode
  240.  
  241.      ei    str        End insert mode
  242.  
  243.      eo    bool         Can erase overstrikes with a blank
  244.  
  245.      EP    bool  (o)    Even parity
  246.  
  247.      es    bool         Escape can be used on the status line
  248.  
  249.      ff    str     (P*)    Hardcopy terminal page eject
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257. Printed 8/14/86          1 November 1985            2
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.      fs    str        Return from status line
  280.  
  281.      gn    bool         Generic line type (_✓e._✓g. dialup, switch)
  282.  
  283.      hc    bool         Hardcopy terminal
  284.  
  285.      HD    bool  (o)    Half-duplex
  286.  
  287.      hd    str        Half-line down (forward 1/2 linefeed)
  288.  
  289.      ho    str     (P)    Home cursor
  290.  
  291.      hs    bool         Has extra "status line"
  292.  
  293.      hu    str        Half-line up (reverse 1/2 linefeed)
  294.  
  295.      hz    bool         Cannot print ~s (Hazeltine)
  296.  
  297.      i1-i3 str        Terminal initialization strings (_✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o only)
  298.  
  299.      IC    str     (NP*)    Insert _✓n blank characters
  300.  
  301.      ic    str     (P*)    Insert character
  302.  
  303.      if    str        Name of file containing initialization string
  304.  
  305.      im    str        Enter insert mode
  306.  
  307.      in    bool         Insert mode distinguishes nulls
  308.  
  309.      iP    str        Pathname of program for initialization (_✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o only)
  310.  
  311.      ip    str     (P*)    Insert pad after character inserted
  312.  
  313.      is    str        Terminal initialization string (_✓t_✓e_✓r_✓m_✓c_✓a_✓p only)
  314.  
  315.      it    num        Tabs initially every _✓n positions
  316.  
  317.      K1    str        Sent by keypad upper left
  318.  
  319.      K2    str        Sent by keypad upper right
  320.  
  321.      K3    str        Sent by keypad center
  322.  
  323.      K4    str        Sent by keypad lower left
  324.  
  325.      K5    str        Sent by keypad lower right
  326.  
  327.      k0-k9 str        Sent by function keys 0-9
  328.  
  329.      kA    str        Sent by insert-line key
  330.  
  331.      ka    str        Sent by clear-all-tabs key
  332.  
  333.      kb    str        Sent by backspace key
  334.  
  335.      kC    str        Sent by clear-screen or erase key
  336.  
  337.      kD    str        Sent by delete-character key
  338.  
  339.      kd    str        Sent by down-arrow key
  340.  
  341.      kE    str        Sent by clear-to-end-of-line key
  342.  
  343.      ke    str        Out of "keypad transmit" mode
  344.  
  345.      kF    str        Sent by scroll-forward/down key
  346.  
  347.      kH    str        Sent by home-down key
  348.  
  349.      kh    str        Sent by home key
  350.  
  351.      kI    str        Sent by insert-character or enter-insert-mode key
  352.  
  353.      kL    str        Sent by delete-line key
  354.  
  355.      kl    str        Sent by left-arrow key
  356.  
  357.      kM    str        Sent by insert key while in insert mode
  358.  
  359.      km    bool         Has a "meta" key (shift, sets parity bit)
  360.  
  361.      kN    str        Sent by next-page key
  362.  
  363.      kn    num     (o)    Number of function (k0-k9) keys (default 0)
  364.  
  365.      ko    str     (o)    Termcap entries for other non-function keys
  366.  
  367.      kP    str        Sent by previous-page key
  368.  
  369.      kR    str        Sent by scroll-backward/up key
  370.  
  371.      kr    str        Sent by right-arrow key
  372.  
  373.      kS    str        Sent by clear-to-end-of-screen key
  374.  
  375.      ks    str        Put terminal in "keypad transmit" mode
  376.  
  377.      kT    str        Sent by set-tab key
  378.  
  379.      kt    str        Sent by clear-tab key
  380.  
  381.      ku    str        Sent by up-arrow key
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389. Printed 8/14/86          1 November 1985            3
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.      l0-l9 str        Labels on function keys if not "f_✓n"
  412.  
  413.      LC    bool  (o)    Lower-case only
  414.  
  415.      LE    str     (NP)    Move cursor left _✓n positions
  416.  
  417.      le    str     (P)    Move cursor left one position
  418.  
  419.      li    num        Number of lines on screen or page (See BUGS section below)
  420.  
  421.      ll    str        Last line, first column
  422.  
  423.      lm    num        Lines of memory if > li (0 means varies)
  424.  
  425.      ma    str     (o)    Arrow key map (used by _✓v_✓i version 2 only)
  426.  
  427.      mb    str        Turn on blinking attribute
  428.  
  429.      md    str        Turn on bold (extra bright) attribute
  430.  
  431.      me    str        Turn off all attributes
  432.  
  433.      mh    str        Turn on half-bright attribute
  434.  
  435.      mi    bool         Safe to move while in insert mode
  436.  
  437.      mk    str        Turn on blank attribute (characters invisible)
  438.  
  439.      ml    str     (o)    Memory lock on above cursor
  440.  
  441.      mm    str        Turn on "meta mode" (8th bit)
  442.  
  443.      mo    str        Turn off "meta mode"
  444.  
  445.      mp    str        Turn on protected attribute
  446.  
  447.      mr    str        Turn on reverse-video attibute
  448.  
  449.      ms    bool         Safe to move in standout modes
  450.  
  451.      mu    str     (o)    Memory unlock (turn off memory lock)
  452.  
  453.      nc    bool  (o)    No correctly-working cr (Datamedia 2500, Hazeltine 2000)
  454.  
  455.      nd    str        Non-destructive space (cursor right)
  456.  
  457.      NL    bool  (o)    \n is newline, not line feed
  458.  
  459.      nl    str     (o)    Newline character if not \n
  460.  
  461.      ns    bool  (o)    Terminal is a CRT but doesn't scroll
  462.  
  463.      nw    str     (P)    Newline (behaves like cr followed by do)
  464.  
  465.      OP    bool  (o)    Odd parity
  466.  
  467.      os    bool         Terminal overstrikes
  468.  
  469.      pb    num        Lowest baud where delays are required
  470.  
  471.      pc    str        Pad character (default NUL)
  472.  
  473.      pf    str        Turn off the printer
  474.  
  475.      pk    str        Program function key _✓n to type string _✓s (_✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o only)
  476.  
  477.      pl    str        Program function key _✓n to execute string _✓s (_✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o only)
  478.  
  479.      pO    str     (N)    Turn on the printer for _✓n bytes
  480.  
  481.      po    str        Turn on the printer
  482.  
  483.      ps    str        Print contents of the screen
  484.  
  485.      pt    bool  (o)    Has hardware tabs (may need to be set with is)
  486.  
  487.      px    str        Program function key _✓n to transmit string _✓s (_✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o only)
  488.  
  489.      r1-r3 str        Reset terminal completely to sane modes (_✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o only)
  490.  
  491.      rc    str     (P)    Restore cursor to position of last sc
  492.  
  493.      rf    str        Name of file containing reset codes
  494.  
  495.      RI    str     (NP)    Move cursor right _✓n positions
  496.  
  497.      rp    str     (NP*)    Repeat character _✓c _✓n times
  498.  
  499.      rs    str        Reset terminal completely to sane modes (_✓t_✓e_✓r_✓m_✓c_✓a_✓p only)
  500.  
  501.      sa    str     (NP)    Define the video attributes
  502.  
  503.      sc    str     (P)    Save cursor position
  504.  
  505.      se    str        End standout mode
  506.  
  507.      SF    str     (NP*)    Scroll forward _✓n lines
  508.  
  509.      sf    str     (P)    Scroll text up
  510.  
  511.      sg    num        Number of garbage chars left by so or se (default 0)
  512.  
  513.      so    str        Begin standout mode
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521. Printed 8/14/86          1 November 1985            4
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.      SR    str     (NP*)    Scroll backward _✓n lines
  544.  
  545.      sr    str     (P)    Scroll text down
  546.  
  547.      st    str        Set a tab in all rows, current column
  548.  
  549.      ta    str     (P)    Tab to next 8-position hardware tab stop
  550.  
  551.      tc    str        Entry of similar terminal - must be last
  552.  
  553.      te    str        String to end programs that use _✓t_✓e_✓r_✓m_✓c_✓a_✓p
  554.  
  555.      ti    str        String to begin programs that use _✓t_✓e_✓r_✓m_✓c_✓a_✓p
  556.  
  557.      ts    str     (N)    Go to status line, column _✓n
  558.  
  559.      UC    bool  (o)    Upper-case only
  560.  
  561.      uc    str        Underscore one character and move past it
  562.  
  563.      ue    str        End underscore mode
  564.  
  565.      ug    num        Number of garbage chars left by us or ue (default 0)
  566.  
  567.      ul    bool         Underline character overstrikes
  568.  
  569.      UP    str     (NP*)    Move cursor up _✓n lines
  570.  
  571.      up    str        Upline (cursor up)
  572.  
  573.      us    str        Start underscore mode
  574.  
  575.      vb    str        Visible bell (must not move cursor)
  576.  
  577.      ve    str        Make cursor appear normal (undo vs/vi)
  578.  
  579.      vi    str        Make cursor invisible
  580.  
  581.      vs    str        Make cursor very visible
  582.  
  583.      vt    num        Virtual terminal number (not supported on all systems)
  584.  
  585.      wi    str     (N)    Set current window
  586.  
  587.      ws    num        Number of columns in status line
  588.  
  589.      xb    bool         Beehive (f1=ESC, f2=^C)
  590.  
  591.      xn    bool         Newline ignored after 80 cols (Concept)
  592.  
  593.      xo    bool         Terminal uses xoff/xon (DC3/DC1) handshaking
  594.  
  595.      xr    bool  (o)    Return acts like ce cr nl (Delta Data)
  596.  
  597.      xs    bool         Standout not erased by overwriting (Hewlett-Packard)
  598.  
  599.      xt    bool         Tabs ruin, magic so char (Teleray 1061)
  600.  
  601.      xx    bool  (o)    Tektronix 4025 insert-line
  602.  
  603.  
  604.  
  605.      A Sample Entry
  606.  
  607.  
  608.  
  609.      The following entry, which describes the Concept-100, is
  610.  
  611.      among the more complex entries in the _✓t_✓e_✓r_✓m_✓c_✓a_✓p file as of
  612.  
  613.      this writing.
  614.  
  615.  
  616.  
  617.      ca|concept100|c100|concept|c104|concept100-4p|HDS Concept-100:\
  618.  
  619.          :al=3*\E^R:am:bl=^G:cd=16*\E^C:ce=16\E^U:cl=2*^L:cm=\Ea%+ %+ :\
  620.  
  621.          :co#80:.cr=9^M:db:dc=16\E^A:dl=3*\E^B:do=^J:ei=\E\200:eo:im=\E^P:in:\
  622.  
  623.          :ip=16*:is=\EU\Ef\E7\E5\E8\El\ENH\EK\E\200\Eo&\200\Eo\47\E:k1=\E5:\
  624.  
  625.          :k2=\E6:k3=\E7:kb=^h:kd=\E<:ke=\Ex:kh=\E?:kl=\E>:kr=\E=:ks=\EX:\
  626.  
  627.          :ku=\E;:le=^H:li#24:mb=\EC:me=\EN\200:mh=\EE:mi:mk=\EH:mp=\EI:\
  628.  
  629.          :mr=\ED:nd=\E=:pb#9600:rp=0.2*\Er%.%+ :se=\Ed\Ee:sf=^J:so=\EE\ED:\
  630.  
  631.          :.ta=8\t:te=\Ev    \200\200\200\200\200\200\Ep\r\n:\
  632.  
  633.          :ti=\EU\Ev  8p\Ep\r:ue=\Eg:ul:up=\E;:us=\EG:\
  634.  
  635.          :vb=\Ek\200\200\200\200\200\200\200\200\200\200\200\200\200\200\EK:\
  636.  
  637.          :ve=\Ew:vs=\EW:vt#8:xn:\
  638.  
  639.          :bs:cr=^M:dC#9:dT#8:nl=^J:ta=^I:pt:
  640.  
  641.  
  642.  
  643.      Entries may continue onto multiple lines by giving a \ as
  644.  
  645.      the last character of a line, and empty fields may be
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653. Printed 8/14/86          1 November 1985            5
  654.  
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.      included for readability (here between the last field on a
  676.  
  677.      line and the first field on the next).  Comments may be
  678.  
  679.      included on lines beginning with "#".
  680.  
  681.  
  682.  
  683.      Types of Capabilities
  684.  
  685.  
  686.  
  687.      Capabilities in _✓t_✓e_✓r_✓m_✓c_✓a_✓p are of three types: Boolean capabil-
  688.  
  689.      ities, which indicate particular features that the terminal
  690.  
  691.      has; numeric capabilities, giving the size of the display or
  692.  
  693.      the size of other attributes; and string capabilities, which
  694.  
  695.      give character sequences that can be used to perform partic-
  696.  
  697.      ular terminal operations.    All capabilities have two-letter
  698.  
  699.      codes.  For instance, the fact that the Concept has
  700.  
  701.      _✓a_✓u_✓t_✓o_✓m_✓a_✓t_✓i_✓c _✓m_✓a_✓r_✓g_✓i_✓n_✓s (_✓i._✓e., an automatic return and linefeed
  702.  
  703.      when the end of a line is reached) is indicated by the
  704.  
  705.      Boolean capability am.  Hence the description of the Concept
  706.  
  707.      includes am.
  708.  
  709.  
  710.  
  711.      Numeric capabilities are followed by the character `#' then
  712.  
  713.      the value.  In the example above co, which indicates the
  714.  
  715.      number of columns the display has, gives the value `80' for
  716.  
  717.      the Concept.
  718.  
  719.  
  720.  
  721.      Finally, string-valued capabilities, such as ce (clear-to-
  722.  
  723.      end-of-line sequence) are given by the two-letter code, an
  724.  
  725.      `=', then a string ending at the next following `:'.  A
  726.  
  727.      delay in milliseconds may appear after the `=' in such a
  728.  
  729.      capability, which causes padding characters to be supplied
  730.  
  731.      by _✓t_✓p_✓u_✓t_✓s after the remainder of the string is sent to pro-
  732.  
  733.      vide this delay.  The delay can be either a number, _✓e._✓g.
  734.  
  735.      `20', or a number followed by an `*', _✓i._✓e., `3*'.    An `*'
  736.  
  737.      indicates that the padding required is proportional to the
  738.  
  739.      number of lines affected by the operation, and the amount
  740.  
  741.      given is the per-affected-line padding required.  (In the
  742.  
  743.      case of insert-character, the factor is still the number of
  744.  
  745.      _✓l_✓i_✓n_✓e_✓s affected; this is always 1 unless the terminal has in
  746.  
  747.      and the software uses it.) When an `*' is specified, it is
  748.  
  749.      sometimes useful to give a delay of the form `3.5' to
  750.  
  751.      specify a delay per line to tenths of milliseconds.  (Only
  752.  
  753.      one decimal place is allowed.)
  754.  
  755.  
  756.  
  757.      A number of escape sequences are provided in the string-
  758.  
  759.      valued capabilities for easy encoding of control characters
  760.  
  761.      there.  \E maps to an ESC character, ^X maps to a control-X
  762.  
  763.      for any appropriate X, and the sequences \n \r \t \b \f map
  764.  
  765.      to linefeed, return, tab, backspace, and formfeed, respec-
  766.  
  767.      tively.  Finally, characters may be given as three octal
  768.  
  769.      digits after a \, and the characters ^ and \ may be given as
  770.  
  771.      \^ and \\.  If it is necessary to place a : in a capability
  772.  
  773.      it must be escaped in octal as \072.  If it is necessary to
  774.  
  775.      place a NUL character in a string capability it must be
  776.  
  777.      encoded as \200.  (The routines that deal with _✓t_✓e_✓r_✓m_✓c_✓a_✓p use C
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785. Printed 8/14/86          1 November 1985            6
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807.      strings and strip the high bits of the output very late, so
  808.  
  809.      that a \200 comes out as a \000 would.)
  810.  
  811.  
  812.  
  813.      Sometimes individual capabilities must be commented out.  To
  814.  
  815.      do this, put a period before the capability name.    For exam-
  816.  
  817.      ple, see the first cr and ta in the example above.
  818.  
  819.  
  820.  
  821.      Preparing Descriptions
  822.  
  823.  
  824.  
  825.      We now outline how to prepare descriptions of terminals.
  826.  
  827.      The most effective way to prepare a terminal description is
  828.  
  829.      by imitating the description of a similar terminal in
  830.  
  831.      _✓t_✓e_✓r_✓m_✓c_✓a_✓p and to build up a description gradually, using par-
  832.  
  833.      tial descriptions with _✓v_✓i to check that they are correct.
  834.  
  835.      Be aware that a very unusual terminal may expose deficien-
  836.  
  837.      cies in the ability of the _✓t_✓e_✓r_✓m_✓c_✓a_✓p file to describe it or
  838.  
  839.      bugs in _✓v_✓i.  To easily test a new terminal description you
  840.  
  841.      can set the environment variable TERMCAP to the absolute
  842.  
  843.      pathname of a file containing the description you are work-
  844.  
  845.      ing on and programs will look there rather than in
  846.  
  847.      /_✓e_✓t_✓c/_✓t_✓e_✓r_✓m_✓c_✓a_✓p.  TERMCAP can also be set to the _✓t_✓e_✓r_✓m_✓c_✓a_✓p entry
  848.  
  849.      itself to avoid reading the file when starting up a program.
  850.  
  851.  
  852.  
  853.      To get the padding for insert-line right (if the terminal
  854.  
  855.      manufacturer did not document it), a severe test is to use
  856.  
  857.      _✓v_✓i to edit /_✓e_✓t_✓c/_✓p_✓a_✓s_✓s_✓w_✓d at 9600 baud, delete roughly 16 lines
  858.  
  859.      from the middle of the screen, then hit the `u' key several
  860.  
  861.      times quickly.  If the display messes up, more padding is
  862.  
  863.      usually needed.  A similar test can be used for insert-
  864.  
  865.      character.
  866.  
  867.  
  868.  
  869.      Basic Capabilities
  870.  
  871.  
  872.  
  873.      The number of columns on each line of the display is given
  874.  
  875.      by the co numeric capability.  If the display is a CRT, then
  876.  
  877.      the number of lines on the screen is given by the li capa-
  878.  
  879.      bility.  If the display wraps around to the beginning of the
  880.  
  881.      next line when the cursor reaches the right margin, then it
  882.  
  883.      should have the am capability.  If the terminal can clear
  884.  
  885.      its screen, the code to do this is given by the cl string
  886.  
  887.      capability.  If the terminal overstrikes (rather than clear-
  888.  
  889.      ing the position when a character is overwritten), it should
  890.  
  891.      have the os capability.  If the terminal is a printing ter-
  892.  
  893.      minal, with no soft copy unit, give it both hc and os.  (os
  894.  
  895.      applies to storage scope terminals, such as the Tektronix
  896.  
  897.      4010 series, as well as to hard copy and APL terminals.) If
  898.  
  899.      there is a code to move the cursor to the left edge of the
  900.  
  901.      current row, give this as cr.  (Normally this will be
  902.  
  903.      carriage-return, ^M.) If there is a code to produce an audi-
  904.  
  905.      ble signal (bell, beep, _✓e_✓t_✓c.), give this as bl.
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917. Printed 8/14/86          1 November 1985            7
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  932.  
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.      If there is a code (such as backspace) to move the cursor
  940.  
  941.      one position to the left, that capability should be given as
  942.  
  943.      le.  Similarly, codes to move to the right, up, and down
  944.  
  945.      should be given as nd, up, and do, respectively.  These
  946.  
  947.      _✓l_✓o_✓c_✓a_✓l _✓c_✓u_✓r_✓s_✓o_✓r _✓m_✓o_✓t_✓i_✓o_✓n_✓s should not alter the text they pass
  948.  
  949.      over; for example, you would not normally use "nd= " unless
  950.  
  951.      the terminal has the os capability, because the space would
  952.  
  953.      erase the character moved over.
  954.  
  955.  
  956.  
  957.      A very important point here is that the local cursor motions
  958.  
  959.      encoded in _✓t_✓e_✓r_✓m_✓c_✓a_✓p have undefined behavior at the left and
  960.  
  961.      top edges of a CRT display.  Programs should never attempt
  962.  
  963.      to backspace around the left edge, unless bw is given, and
  964.  
  965.      never attempt to go up off the top using local cursor
  966.  
  967.      motions.
  968.  
  969.  
  970.  
  971.      In order to scroll text up, a program goes to the bottom
  972.  
  973.      left corner of the screen and sends the sf (index) string.
  974.  
  975.      To scroll text down, a program goes to the top left corner
  976.  
  977.      of the screen and sends the sr (reverse index) string.  The
  978.  
  979.      strings sf and sr have undefined behavior when not on their
  980.  
  981.      respective corners of the screen.    Parameterized versions of
  982.  
  983.      the scrolling sequences are SF and SR, which have the same
  984.  
  985.      semantics as sf and sr except that they take one parameter
  986.  
  987.      and scroll that many lines.  They also have undefined
  988.  
  989.      behavior except at the appropriate corner of the screen.
  990.  
  991.  
  992.  
  993.      The am capability tells whether the cursor sticks at the
  994.  
  995.      right edge of the screen when text is output there, but this
  996.  
  997.      does not necessarily apply to nd from the last column.
  998.  
  999.      Leftward local motion is defined from the left edge only
  1000.  
  1001.      when bw is given; then an le from the left edge will move to
  1002.  
  1003.      the right edge of the previous row.  This is useful for
  1004.  
  1005.      drawing a box around the edge of the screen, for example.
  1006.  
  1007.      If the terminal has switch-selectable automatic margins, the
  1008.  
  1009.      _✓t_✓e_✓r_✓m_✓c_✓a_✓p description usually assumes that this feature is on,
  1010.  
  1011.      _✓i._✓e., am.    If the terminal has a command that moves to the
  1012.  
  1013.      first column of the next line, that command can be given as
  1014.  
  1015.      nw (newline).  It is permissible for this to clear the
  1016.  
  1017.      remainder of the current line, so if the terminal has no
  1018.  
  1019.      correctly-working CR and LF it may still be possible to
  1020.  
  1021.      craft a working nw out of one or both of them.
  1022.  
  1023.  
  1024.  
  1025.      These capabilities suffice to describe hardcopy and "glass-
  1026.  
  1027.      tty" terminals.  Thus the Teletype model 33 is described as
  1028.  
  1029.  
  1030.  
  1031.          T3|tty33|33|tty|Teletype model 33:\
  1032.  
  1033.              :bl=^G:co#72:cr=^M:do=^J:hc:os:
  1034.  
  1035.  
  1036.  
  1037.      and the Lear Siegler ADM-3 is described as
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049. Printed 8/14/86          1 November 1985            8
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1064.  
  1065.  
  1066.  
  1067.  
  1068.  
  1069.  
  1070.  
  1071.          l3|adm3|3|LSI ADM-3:\
  1072.  
  1073.              :am:bl=^G:cl=^Z:co#80:cr=^M:do=^J:le=^H:li#24:sf=^J:
  1074.  
  1075.  
  1076.  
  1077.      Parameterized Strings
  1078.  
  1079.  
  1080.  
  1081.      Cursor addressing and other strings requiring parameters are
  1082.  
  1083.      described by a parameterized string capability, with
  1084.  
  1085.      _✓p_✓r_✓i_✓n_✓t_✓f(3S)-like escapes %x in it, while other characters are
  1086.  
  1087.      passed through unchanged.    For example, to address the cur-
  1088.  
  1089.      sor the cm capability is given, using two parameters: the
  1090.  
  1091.      row and column to move to.  (Rows and columns are numbered
  1092.  
  1093.      from zero and refer to the physical screen visible to the
  1094.  
  1095.      user, not to any unseen memory.  If the terminal has
  1096.  
  1097.      memory-relative cursor addressing, that can be indicated by
  1098.  
  1099.      an analogous CM capability.)
  1100.  
  1101.  
  1102.  
  1103.      The % encodings have the following meanings:
  1104.  
  1105.  
  1106.  
  1107.       %%   output `%'
  1108.  
  1109.       %d   output value as in _✓p_✓r_✓i_✓n_✓t_✓f %d
  1110.  
  1111.       %2   output value as in _✓p_✓r_✓i_✓n_✓t_✓f %2d
  1112.  
  1113.       %3   output value as in _✓p_✓r_✓i_✓n_✓t_✓f %3d
  1114.  
  1115.       %.   output value as in _✓p_✓r_✓i_✓n_✓t_✓f %c
  1116.  
  1117.       %+_✓x  add _✓x to value, then do %.
  1118.  
  1119.       %>_✓x_✓y if value > _✓x then add _✓y, no output
  1120.  
  1121.       %r   reverse order of two parameters, no output
  1122.  
  1123.       %i   increment by one, no output
  1124.  
  1125.       %n   exclusive-or all parameters with 0140 (Datamedia 2500)
  1126.  
  1127.       %B   BCD (16*(value/10)) + (value%10), no output
  1128.  
  1129.       %D   Reverse coding (value - 2*(value%16)), no output (Delta Data)
  1130.  
  1131.  
  1132.  
  1133.      Consider the Hewlett-Packard 2645, which, to get to row 3
  1134.  
  1135.      and column 12, needs to be sent "\E&a12c03Y" padded for 6
  1136.  
  1137.      milliseconds.  Note that the order of the row and column
  1138.  
  1139.      coordinates is reversed here and that the row and column are
  1140.  
  1141.      sent as two-digit integers.  Thus its cm capability is
  1142.  
  1143.      "cm=6\E&%r%2c%2Y".
  1144.  
  1145.  
  1146.  
  1147.      The Microterm ACT-IV needs the current row and column sent
  1148.  
  1149.      simply encoded in binary preceded by a ^T, "cm=^T%.%.".
  1150.  
  1151.      Terminals that use "%." need to be able to backspace the
  1152.  
  1153.      cursor (le) and to move the cursor up one line on the screen
  1154.  
  1155.      (up).  This is necessary because it is not always safe to
  1156.  
  1157.      transmit \n, ^D, and \r, as the system may change or discard
  1158.  
  1159.      them.  (Programs using _✓t_✓e_✓r_✓m_✓c_✓a_✓p must set terminal modes so
  1160.  
  1161.      that tabs are not expanded, so \t is safe to send.  This
  1162.  
  1163.      turns out to be essential for the Ann Arbor 4080.)
  1164.  
  1165.  
  1166.  
  1167.      A final example is the Lear Siegler ADM-3a, which offsets
  1168.  
  1169.      row and column by a blank character, thus "cm=\E=%+ %+ ".
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181. Printed 8/14/86          1 November 1985            9
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.      Row or column absolute cursor addressing can be given as
  1204.  
  1205.      single parameter capabilities ch (horizontal position abso-
  1206.  
  1207.      lute) and cv (vertical position absolute).  Sometimes these
  1208.  
  1209.      are shorter than the more general two-parameter sequence (as
  1210.  
  1211.      with the Hewlett-Packard 2645) and can be used in preference
  1212.  
  1213.      to cm.  If there are parameterized local motions (_✓e._✓g., move
  1214.  
  1215.      _✓n positions to the right) these can be given as DO, LE, RI,
  1216.  
  1217.      and UP with a single parameter indicating how many positions
  1218.  
  1219.      to move.  These are primarily useful if the terminal does
  1220.  
  1221.      not have cm, such as the Tektronix 4025.
  1222.  
  1223.  
  1224.  
  1225.      Cursor Motions
  1226.  
  1227.  
  1228.  
  1229.      If the terminal has a fast way to home the cursor (to the
  1230.  
  1231.      very upper left corner of the screen), this can be given as
  1232.  
  1233.      ho.  Similarly, a fast way of getting to the lower left-hand
  1234.  
  1235.      corner can be given as ll; this may involve going up with up
  1236.  
  1237.      from the home position, but a program should never do this
  1238.  
  1239.      itself (unless ll does), because it can make no assumption
  1240.  
  1241.      about the effect of moving up from the home position.  Note
  1242.  
  1243.      that the home position is the same as cursor address (0,0):
  1244.  
  1245.      to the top left corner of the screen, not of memory.
  1246.  
  1247.      (Therefore, the "\EH" sequence on Hewlett-Packard terminals
  1248.  
  1249.      cannot be used for ho.)
  1250.  
  1251.  
  1252.  
  1253.      Area Clears
  1254.  
  1255.  
  1256.  
  1257.      If the terminal can clear from the current position to the
  1258.  
  1259.      end of the line, leaving the cursor where it is, this should
  1260.  
  1261.      be given as ce.  If the terminal can clear from the current
  1262.  
  1263.      position to the end of the display, this should be given as
  1264.  
  1265.      cd.  cd must only be invoked from the first column of a
  1266.  
  1267.      line.  (Therefore, it can be simulated by a request to
  1268.  
  1269.      delete a large number of lines, if a true cd is not avail-
  1270.  
  1271.      able.)
  1272.  
  1273.  
  1274.  
  1275.      Insert/Delete Line
  1276.  
  1277.  
  1278.  
  1279.      If the terminal can open a new blank line before the line
  1280.  
  1281.      containing the cursor, this should be given as al; this must
  1282.  
  1283.      be invoked only from the first position of a line.  The cur-
  1284.  
  1285.      sor must then appear at the left of the newly blank line.
  1286.  
  1287.      If the terminal can delete the line that the cursor is on,
  1288.  
  1289.      this should be given as dl; this must only be used from the
  1290.  
  1291.      first position on the line to be deleted.    Versions of al
  1292.  
  1293.      and dl which take a single parameter and insert or delete
  1294.  
  1295.      that many lines can be given as AL and DL.  If the terminal
  1296.  
  1297.      has a settable scrolling region (like the VT100), the com-
  1298.  
  1299.      mand to set this can be described with the cs capability,
  1300.  
  1301.      which takes two parameters: the top and bottom lines of the
  1302.  
  1303.      scrolling region.    The cursor position is, alas, undefined
  1304.  
  1305.      after using this command.    It is possible to get the effect
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313. Printed 8/14/86          1 November 1985               10
  1314.  
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.      of insert or delete line using this command - the sc and rc
  1336.  
  1337.      (save and restore cursor) commands are also useful.  Insert-
  1338.  
  1339.      ing lines at the top or bottom of the screen can also be
  1340.  
  1341.      done using sr or sf on many terminals without a true
  1342.  
  1343.      insert/delete line, and is often faster even on terminals
  1344.  
  1345.      with those features.
  1346.  
  1347.  
  1348.  
  1349.      If the terminal has the ability to define a window as part
  1350.  
  1351.      of memory which all commands affect, it should be given as
  1352.  
  1353.      the parameterized string wi.  The four parameters are the
  1354.  
  1355.      starting and ending lines in memory and the starting and
  1356.  
  1357.      ending columns in memory, in that order.  (This _✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o
  1358.  
  1359.      capability is described for completeness.    It is unlikely
  1360.  
  1361.      that any _✓t_✓e_✓r_✓m_✓c_✓a_✓p-using program will support it.)
  1362.  
  1363.  
  1364.  
  1365.      If the terminal can retain display memory above the screen,
  1366.  
  1367.      then the da capability should be given; if display memory
  1368.  
  1369.      can be retained below, then db should be given.  These indi-
  1370.  
  1371.      cate that deleting a line or scrolling may bring non-blank
  1372.  
  1373.      lines up from below or that scrolling back with sr may bring
  1374.  
  1375.      down non-blank lines.
  1376.  
  1377.  
  1378.  
  1379.      Insert/Delete Character
  1380.  
  1381.  
  1382.  
  1383.      There are two basic kinds of intelligent terminals with
  1384.  
  1385.      respect to insert/delete character that can be described
  1386.  
  1387.      using _✓t_✓e_✓r_✓m_✓c_✓a_✓p.  The most common insert/delete character
  1388.  
  1389.      operations affect only the characters on the current line
  1390.  
  1391.      and shift characters off the end of the line rigidly.  Other
  1392.  
  1393.      terminals, such as the Concept-100 and the Perkin Elmer Owl,
  1394.  
  1395.      make a distinction between typed and untyped blanks on the
  1396.  
  1397.      screen, shifting upon an insert or delete only to an untyped
  1398.  
  1399.      blank on the screen which is either eliminated or expanded
  1400.  
  1401.      to two untyped blanks.  You can determine the kind of termi-
  1402.  
  1403.      nal you have by clearing the screen then typing text
  1404.  
  1405.      separated by cursor motions.  Type "abc    def" using local
  1406.  
  1407.      cursor motions (not spaces) between the "abc" and the "def".
  1408.  
  1409.      Then position the cursor before the "abc" and put the termi-
  1410.  
  1411.      nal in insert mode.  If typing characters causes the rest of
  1412.  
  1413.      the line to shift rigidly and characters to fall off the
  1414.  
  1415.      end, then your terminal does not distinguish between blanks
  1416.  
  1417.      and untyped positions.  If the "abc" shifts over to the
  1418.  
  1419.      "def" which then move together around the end of the current
  1420.  
  1421.      line and onto the next as you insert, then you have the
  1422.  
  1423.      second type of terminal and should give the capability in,
  1424.  
  1425.      which stands for "insert null".  While these are two logi-
  1426.  
  1427.      cally separate attributes (one line _✓v_✓s. multi-line insert
  1428.  
  1429.      mode, and special treatment of untyped spaces), we have seen
  1430.  
  1431.      no terminals whose insert mode cannot be described with the
  1432.  
  1433.      single attribute.
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445. Printed 8/14/86          1 November 1985               11
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.      _✓T_✓e_✓r_✓m_✓c_✓a_✓p can describe both terminals that have an insert mode
  1468.  
  1469.      and terminals that send a simple sequence to open a blank
  1470.  
  1471.      position on the current line.  Give as im the sequence to
  1472.  
  1473.      get into insert mode.  Give as ei the sequence to leave
  1474.  
  1475.      insert mode.  Now give as ic any sequence that needs to be
  1476.  
  1477.      sent just before each character to be inserted.  Most termi-
  1478.  
  1479.      nals with a true insert mode will not give ic; terminals
  1480.  
  1481.      that use a sequence to open a screen position should give it
  1482.  
  1483.      here.  (If your terminal has both, insert mode is usually
  1484.  
  1485.      preferable to ic.    Do not give both unless the terminal
  1486.  
  1487.      actually requires both to be used in combination.) If post-
  1488.  
  1489.      insert padding is needed, give this as a number of mil-
  1490.  
  1491.      liseconds in ip (a string option).  Any other sequence that
  1492.  
  1493.      may need to be sent after insertion of a single character
  1494.  
  1495.      can also be given in ip.  If your terminal needs to be
  1496.  
  1497.      placed into an `insert mode' and needs a special code
  1498.  
  1499.      preceding each inserted character, then both im/ei and ic
  1500.  
  1501.      can be given, and both will be used.  The IC capability,
  1502.  
  1503.      with one parameter _✓n, will repeat the effects of ic _✓n times.
  1504.  
  1505.  
  1506.  
  1507.      It is occasionally necessary to move around while in insert
  1508.  
  1509.      mode to delete characters on the same line (_✓e._✓g., if there
  1510.  
  1511.      is a tab after the insertion position).  If your terminal
  1512.  
  1513.      allows motion while in insert mode, you can give the capa-
  1514.  
  1515.      bility mi to speed up inserting in this case.  Omitting mi
  1516.  
  1517.      will affect only speed.  Some terminals (notably
  1518.  
  1519.      Datamedia's) must not have mi because of the way their
  1520.  
  1521.      insert mode works.
  1522.  
  1523.  
  1524.  
  1525.      Finally, you can specify dc to delete a single character, DC
  1526.  
  1527.      with one parameter _✓n to delete _✓n characters, and delete mode
  1528.  
  1529.      by giving dm and ed to enter and exit delete mode (which is
  1530.  
  1531.      any mode the terminal needs to be placed in for dc to work).
  1532.  
  1533.  
  1534.  
  1535.      Highlighting, Underlining, and Visible Bells
  1536.  
  1537.  
  1538.  
  1539.      If your terminal has one or more kinds of display attri-
  1540.  
  1541.      butes, these can be represented in a number of different
  1542.  
  1543.      ways.  You should choose one display form as _✓s_✓t_✓a_✓n_✓d_✓o_✓u_✓t _✓m_✓o_✓d_✓e,
  1544.  
  1545.      representing a good high-contrast, easy-on-the-eyes format
  1546.  
  1547.      for highlighting error messages and other attention getters.
  1548.  
  1549.      (If you have a choice, reverse video plus half-bright is
  1550.  
  1551.      good, or reverse video alone.) The sequences to enter and
  1552.  
  1553.      exit standout mode are given as so and se, respectively.  If
  1554.  
  1555.      the code to change into or out of standout mode leaves one
  1556.  
  1557.      or even two blank spaces or garbage characters on the
  1558.  
  1559.      screen, as the TVI 912 and Teleray 1061 do, then sg should
  1560.  
  1561.      be given to tell how many characters are left.
  1562.  
  1563.  
  1564.  
  1565.      Codes to begin underlining and end underlining can be given
  1566.  
  1567.      as us and ue, respectively.  Underline mode change garbage
  1568.  
  1569.      is specified by ug, similar to sg.  If the terminal has a
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577. Printed 8/14/86          1 November 1985               12
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599.      code to underline the current character and move the cursor
  1600.  
  1601.      one position to the right, such as the Microterm Mime, this
  1602.  
  1603.      can be given as uc.
  1604.  
  1605.  
  1606.  
  1607.      Other capabilities to enter various highlighting modes
  1608.  
  1609.      include mb (blinking), md (bold or extra bright), mh (dim or
  1610.  
  1611.      half-bright), mk (blanking or invisible text), mp (pro-
  1612.  
  1613.      tected), mr (reverse video), me (turn off _✓a_✓l_✓l attribute
  1614.  
  1615.      modes), as (enter alternate character set mode), and ae
  1616.  
  1617.      (exit alternate character set mode).  Turning on any of
  1618.  
  1619.      these modes singly may or may not turn off other modes.
  1620.  
  1621.  
  1622.  
  1623.      If there is a sequence to set arbitrary combinations of
  1624.  
  1625.      mode, this should be given as sa (set attributes), taking 9
  1626.  
  1627.      parameters.  Each parameter is either 0 or 1, as the
  1628.  
  1629.      corresponding attributes is on or off.  The 9 parameters
  1630.  
  1631.      are, in order: standout, underline, reverse, blink, dim,
  1632.  
  1633.      bold, blank, protect, and alternate character set.  Not all
  1634.  
  1635.      modes need be supported by sa, only those for which
  1636.  
  1637.      corresponding attribute commands exist.  (It is unlikely
  1638.  
  1639.      that a _✓t_✓e_✓r_✓m_✓c_✓a_✓p-using program will support this capability,
  1640.  
  1641.      which is defined for compatibility with _✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o.)
  1642.  
  1643.  
  1644.  
  1645.      Terminals with the "magic cookie" glitches (sg and ug),
  1646.  
  1647.      rather than maintaining extra attribute bits for each char-
  1648.  
  1649.      acter cell, instead deposit special "cookies", or "garbage
  1650.  
  1651.      characters", when they receive mode-setting sequences, which
  1652.  
  1653.      affect the display algorithm.
  1654.  
  1655.  
  1656.  
  1657.      Some terminals, such as the Hewlett-Packard 2621, automati-
  1658.  
  1659.      cally leave standout mode when they move to a new line or
  1660.  
  1661.      when the cursor is addressed.  Programs using standout mode
  1662.  
  1663.      should exit standout mode on such terminals before moving
  1664.  
  1665.      the cursor or sending a newline.  On terminals where this is
  1666.  
  1667.      not a problem, the ms capability should be present to say
  1668.  
  1669.      that this overhead is unnecessary.
  1670.  
  1671.  
  1672.  
  1673.      If the terminal has a way of flashing the screen to indicate
  1674.  
  1675.      an error quietly (a bell replacement), this can be given as
  1676.  
  1677.      vb; it must not move the cursor.
  1678.  
  1679.  
  1680.  
  1681.      If the cursor needs to be made more visible than normal when
  1682.  
  1683.      it is not on the bottom line (to change, for example, a
  1684.  
  1685.      non-blinking underline into an easier-to-find block or
  1686.  
  1687.      blinking underline), give this sequence as vs.  If there is
  1688.  
  1689.      a way to make the cursor completely invisible, give that as
  1690.  
  1691.      vi.  The capability ve, which undoes the effects of both of
  1692.  
  1693.      these modes, should also be given.
  1694.  
  1695.  
  1696.  
  1697.      If your terminal correctly displays underlined characters
  1698.  
  1699.      (with no special codes needed) even though it does not over-
  1700.  
  1701.      strike, then you should give the capability ul.  If
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709. Printed 8/14/86          1 November 1985               13
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.      overstrikes are erasable with a blank, this should be indi-
  1732.  
  1733.      cated by giving eo.
  1734.  
  1735.  
  1736.  
  1737.      Keypad
  1738.  
  1739.  
  1740.  
  1741.      If the terminal has a keypad that transmits codes when the
  1742.  
  1743.      keys are pressed, this information can be given.  Note that
  1744.  
  1745.      it is not possible to handle terminals where the keypad only
  1746.  
  1747.      works in local mode (this applies, for example, to the
  1748.  
  1749.      unshifted Hewlett-Packard 2621 keys).  If the keypad can be
  1750.  
  1751.      set to transmit or not transmit, give these codes as ks and
  1752.  
  1753.      ke.  Otherwise the keypad is assumed to always transmit.
  1754.  
  1755.      The codes sent by the left-arrow, right-arrow, up-arrow,
  1756.  
  1757.      down-arrow, and home keys can be given as kl, kr, ku, kd,
  1758.  
  1759.      and kh, respectively.  If there are function keys such as
  1760.  
  1761.      f0, f1, ..., f9, the codes they send can be given as k0, k1,
  1762.  
  1763.      k9.  If these keys have labels other than the default f0
  1764.  
  1765.      through f9, the labels can be given as l0, l1, l9.  The
  1766.  
  1767.      codes transmitted by certain other special keys can be
  1768.  
  1769.      given: kH (home down), kb (backspace), ka (clear all tabs),
  1770.  
  1771.      kt (clear the tab stop in this column), kC (clear screen or
  1772.  
  1773.      erase), kD (delete character), kL (delete line), kM (exit
  1774.  
  1775.      insert mode), kE (clear to end of line), kS (clear to end of
  1776.  
  1777.      screen), kI (insert character or enter insert mode), kA
  1778.  
  1779.      (insert line), kN (next page), kP (previous page), kF
  1780.  
  1781.      (scroll forward/down), kR (scroll backward/up), and kT (set
  1782.  
  1783.      a tab stop in this column).  In addition, if the keypad has
  1784.  
  1785.      a 3 by 3 array of keys including the four arrow keys, then
  1786.  
  1787.      the other five keys can be given as K1, K2, K3, K4, and K5.
  1788.  
  1789.      These keys are useful when the effects of a 3 by 3 direc-
  1790.  
  1791.      tional pad are needed.  The obsolete ko capability formerly
  1792.  
  1793.      used to describe "other" function keys has been completely
  1794.  
  1795.      supplanted by the above capabilities.
  1796.  
  1797.  
  1798.  
  1799.      The ma entry is also used to indicate arrow keys on termi-
  1800.  
  1801.      nals that have single-character arrow keys.  It is obsolete
  1802.  
  1803.      but still in use in version 2 of _✓v_✓i which must be run on
  1804.  
  1805.      some minicomputers due to memory limitations.  This field is
  1806.  
  1807.      redundant with kl, kr, ku, kd, and kh.  It consists of
  1808.  
  1809.      groups of two characters.    In each group, the first charac-
  1810.  
  1811.      ter is what an arrow key sends, and the second character is
  1812.  
  1813.      the corresponding _✓v_✓i command.  These commands are h for kl,
  1814.  
  1815.      j for kd, k for ku, l for kr, and H for kh.  For example,
  1816.  
  1817.      the Mime would have "ma=^Hh^Kj^Zk^Xl" indicating arrow keys
  1818.  
  1819.      left (^H), down (^K), up (^Z), and right (^X).  (There is no
  1820.  
  1821.      home key on the Mime.)
  1822.  
  1823.  
  1824.  
  1825.      Tabs and Initialization
  1826.  
  1827.  
  1828.  
  1829.      If the terminal needs to be in a special mode when running a
  1830.  
  1831.      program that uses these capabilities, the codes to enter and
  1832.  
  1833.      exit this mode can be given as ti and te.    This arises, for
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841. Printed 8/14/86          1 November 1985               14
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.  
  1863.      example, from terminals like the Concept with more than one
  1864.  
  1865.      page of memory.  If the terminal has only memory-relative
  1866.  
  1867.      cursor addressing and not screen-relative cursor addressing,
  1868.  
  1869.      a screen-sized window must be fixed into the display for
  1870.  
  1871.      cursor addressing to work properly.  This is also used for
  1872.  
  1873.      the Tektronix 4025, where ti sets the command character to
  1874.  
  1875.      be the one used by _✓t_✓e_✓r_✓m_✓c_✓a_✓p.
  1876.  
  1877.  
  1878.  
  1879.      Other capabilities include is, an initialization string for
  1880.  
  1881.      the terminal, and if, the name of a file containing long
  1882.  
  1883.      initialization strings.  These strings are expected to set
  1884.  
  1885.      the terminal into modes consistent with the rest of the
  1886.  
  1887.      _✓t_✓e_✓r_✓m_✓c_✓a_✓p description.  They are normally sent to the terminal
  1888.  
  1889.      by the _✓t_✓s_✓e_✓t program each time the user logs in.  They will
  1890.  
  1891.      be printed in the following order: is; setting tabs using ct
  1892.  
  1893.      and st; and finally if.  (_✓T_✓e_✓r_✓m_✓i_✓n_✓f_✓o uses i1-i2 instead of is
  1894.  
  1895.      and runs the program iP and prints i3 after the other ini-
  1896.  
  1897.      tializations.) A pair of sequences that does a harder reset
  1898.  
  1899.      from a totally unknown state can be analogously given as rs
  1900.  
  1901.      and if.  These strings are output by the _✓r_✓e_✓s_✓e_✓t program,
  1902.  
  1903.      which is used when the terminal gets into a wedged state.
  1904.  
  1905.      (_✓T_✓e_✓r_✓m_✓i_✓n_✓f_✓o uses r1-r3 instead of rs.) Commands are normally
  1906.  
  1907.      placed in rs and rf only if they produce annoying effects on
  1908.  
  1909.      the screen and are not necessary when logging in.    For exam-
  1910.  
  1911.      ple, the command to set the VT100 into 80-column mode would
  1912.  
  1913.      normally be part of is, but it causes an annoying glitch of
  1914.  
  1915.      the screen and is not normally needed since the terminal is
  1916.  
  1917.      usually already in 80-column mode.
  1918.  
  1919.  
  1920.  
  1921.      If the terminal has hardware tabs, the command to advance to
  1922.  
  1923.      the next tab stop can be given as ta (usually ^I).  A "back-
  1924.  
  1925.      tab" command which moves leftward to the previous tab stop
  1926.  
  1927.      can be given as bt.  By convention, if the terminal driver
  1928.  
  1929.      modes indicate that tab stops are being expanded by the com-
  1930.  
  1931.      puter rather than being sent to the terminal, programs
  1932.  
  1933.      should not use ta or bt even if they are present, since the
  1934.  
  1935.      user may not have the tab stops properly set.  If the termi-
  1936.  
  1937.      nal has hardware tabs that are initially set every _✓n posi-
  1938.  
  1939.      tions when the terminal is powered up, then the numeric
  1940.  
  1941.      parameter it is given, showing the number of positions
  1942.  
  1943.      between tab stops.  This is normally used by the _✓t_✓s_✓e_✓t com-
  1944.  
  1945.      mand to determine whether to set the driver mode for
  1946.  
  1947.      hardware tab expansion, and whether to set the tab stops.
  1948.  
  1949.      If the terminal has tab stops that can be saved in nonvola-
  1950.  
  1951.      tile memory, the _✓t_✓e_✓r_✓m_✓c_✓a_✓p description can assume that they
  1952.  
  1953.      are properly set.
  1954.  
  1955.  
  1956.  
  1957.      If there are commands to set and clear tab stops, they can
  1958.  
  1959.      be given as ct (clear all tab stops) and st (set a tab stop
  1960.  
  1961.      in the current column of every row).  If a more complex
  1962.  
  1963.      sequence is needed to set the tabs than can be described by
  1964.  
  1965.      this, the sequence can be placed in is or if.
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973. Printed 8/14/86          1 November 1985               15
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.      Delays
  1996.  
  1997.  
  1998.  
  1999.      Certain capabilities control padding in the terminal driver.
  2000.  
  2001.      These are primarily needed by hardcopy terminals and are
  2002.  
  2003.      used by the _✓t_✓s_✓e_✓t program to set terminal driver modes
  2004.  
  2005.      appropriately.  Delays embedded in the capabilities cr, sf,
  2006.  
  2007.      le, ff, and ta will cause the appropriate delay bits to be
  2008.  
  2009.      set in the terminal driver.  If pb (padding baud rate) is
  2010.  
  2011.      given, these values can be ignored at baud rates below the
  2012.  
  2013.      value of pb.  For 4.2BSD _✓t_✓s_✓e_✓t, the delays are given as
  2014.  
  2015.      numeric capabilities dC, dN, dB, dF, and dT instead.
  2016.  
  2017.  
  2018.  
  2019.      Miscellaneous
  2020.  
  2021.  
  2022.  
  2023.      If the terminal requires other than a NUL (zero) character
  2024.  
  2025.      as a pad, this can be given as pc.  Only the first character
  2026.  
  2027.      of the pc string is used.
  2028.  
  2029.  
  2030.  
  2031.      If the terminal has commands to save and restore the posi-
  2032.  
  2033.      tion of the cursor, give them as sc and rc.
  2034.  
  2035.  
  2036.  
  2037.      If the terminal has an extra "status line" that is not nor-
  2038.  
  2039.      mally used by software, this fact can be indicated.  If the
  2040.  
  2041.      status line is viewed as an extra line below the bottom
  2042.  
  2043.      line, then the capability hs should be given.  Special
  2044.  
  2045.      strings to go to a position in the status line and to return
  2046.  
  2047.      from the status line can be given as ts and fs.  (fs must
  2048.  
  2049.      leave the cursor position in the same place that it was
  2050.  
  2051.      before ts.  If necessary, the sc and rc strings can be
  2052.  
  2053.      included in ts and fs to get this effect.) The capability ts
  2054.  
  2055.      takes one parameter, which is the column number of the
  2056.  
  2057.      status line to which the cursor is to be moved.  If escape
  2058.  
  2059.      sequences and other special commands such as tab work while
  2060.  
  2061.      in the status line, the flag es can be given.  A string that
  2062.  
  2063.      turns off the status line (or otherwise erases its contents)
  2064.  
  2065.      should be given as ds.  The status line is normally assumed
  2066.  
  2067.      to be the same width as the rest of the screen, _✓i._✓e., co.
  2068.  
  2069.      If the status line is a different width (possibly because
  2070.  
  2071.      the terminal does not allow an entire line to be loaded),
  2072.  
  2073.      then its width in columns can be indicated with the numeric
  2074.  
  2075.      parameter ws.
  2076.  
  2077.  
  2078.  
  2079.      If the terminal can move up or down half a line, this can be
  2080.  
  2081.      indicated with hu (half-line up) and hd (half-line down).
  2082.  
  2083.      This is primarily useful for superscripts and subscripts on
  2084.  
  2085.      hardcopy terminals.  If a hardcopy terminal can eject to the
  2086.  
  2087.      next page (form feed), give this as ff (usually ^L).
  2088.  
  2089.  
  2090.  
  2091.      If there is a command to repeat a given character a given
  2092.  
  2093.      number of times (to save time transmitting a large number of
  2094.  
  2095.      identical characters), this can be indicated with the
  2096.  
  2097.      parameterized string rp.  The first parameter is the
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105. Printed 8/14/86          1 November 1985               16
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.      character to be repeated and the second is the number of
  2128.  
  2129.      times to repeat it.  (This is a _✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o feature that is
  2130.  
  2131.      unlikely to be supported by a program that uses _✓t_✓e_✓r_✓m_✓c_✓a_✓p.)
  2132.  
  2133.  
  2134.  
  2135.      If the terminal has a settable command character, such as
  2136.  
  2137.      the Tektronix 4025, this can be indicated with CC.  A proto-
  2138.  
  2139.      type command character is chosen which is used in all capa-
  2140.  
  2141.      bilities.    This character is given in the CC capability to
  2142.  
  2143.      identify it.  The following convention is supported on some
  2144.  
  2145.      UNIX systems: The environment is to be searched for a CC
  2146.  
  2147.      variable, and if found, all occurrences of the prototype
  2148.  
  2149.      character are replaced by the character in the environment
  2150.  
  2151.      variable.    This use of the CC environment variable is a very
  2152.  
  2153.      bad idea, as it conflicts with _✓m_✓a_✓k_✓e(1).
  2154.  
  2155.  
  2156.  
  2157.      Terminal descriptions that do not represent a specific kind
  2158.  
  2159.      of known terminal, such as _✓s_✓w_✓i_✓t_✓c_✓h, _✓d_✓i_✓a_✓l_✓u_✓p, _✓p_✓a_✓t_✓c_✓h, and _✓n_✓e_✓t_✓-
  2160.  
  2161.      _✓w_✓o_✓r_✓k, should include the gn (generic) capability so that
  2162.  
  2163.      programs can complain that they do not know how to talk to
  2164.  
  2165.      the terminal.  (This capability does not apply to _✓v_✓i_✓r_✓t_✓u_✓a_✓l
  2166.  
  2167.      terminal descriptions for which the escape sequences are
  2168.  
  2169.      known.)
  2170.  
  2171.  
  2172.  
  2173.      If the terminal uses xoff/xon (DC3/DC1) handshaking for flow
  2174.  
  2175.      control, give xo.    Padding information should still be
  2176.  
  2177.      included so that routines can make better decisions about
  2178.  
  2179.      costs, but actual pad characters will not be transmitted.
  2180.  
  2181.  
  2182.  
  2183.      If the terminal has a "meta key" which acts as a shift key,
  2184.  
  2185.      setting the 8th bit of any character transmitted, then this
  2186.  
  2187.      fact can be indicated with km.  Otherwise, software will
  2188.  
  2189.      assume that the 8th bit is parity and it will usually be
  2190.  
  2191.      cleared.  If strings exist to turn this "meta mode" on and
  2192.  
  2193.      off, they can be given as mm and mo.
  2194.  
  2195.  
  2196.  
  2197.      If the terminal has more lines of memory than will fit on
  2198.  
  2199.      the screen at once, the number of lines of memory can be
  2200.  
  2201.      indicated with lm.  An explicit value of 0 indicates that
  2202.  
  2203.      the number of lines is not fixed, but that there is still
  2204.  
  2205.      more memory than fits on the screen.
  2206.  
  2207.  
  2208.  
  2209.      If the terminal is one of those supported by the UNIX system
  2210.  
  2211.      virtual terminal protocol, the terminal number can be given
  2212.  
  2213.      as vt.
  2214.  
  2215.  
  2216.  
  2217.      Media copy strings which control an auxiliary printer con-
  2218.  
  2219.      nected to the terminal can be given as ps: print the con-
  2220.  
  2221.      tents of the screen; pf: turn off the printer; and po: turn
  2222.  
  2223.      on the printer.  When the printer is on, all text sent to
  2224.  
  2225.      the terminal will be sent to the printer.    It is undefined
  2226.  
  2227.      whether the text is also displayed on the terminal screen
  2228.  
  2229.      when the printer is on.  A variation pO takes one parameter
  2230.  
  2231.  
  2232.  
  2233.  
  2234.  
  2235.  
  2236.  
  2237. Printed 8/14/86          1 November 1985               17
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  2252.  
  2253.  
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.      and leaves the printer on for as many characters as the
  2260.  
  2261.      value of the parameter, then turns the printer off.  The
  2262.  
  2263.      parameter should not exceed 255.  All text, including pf, is
  2264.  
  2265.      transparently passed to the printer while pO is in effect.
  2266.  
  2267.  
  2268.  
  2269.      Strings to program function keys can be given as pk, pl, and
  2270.  
  2271.      px.  Each of these strings takes two parameters: the func-
  2272.  
  2273.      tion key number to program (from 0 to 9) and the string to
  2274.  
  2275.      program it with.  Function key numbers out of this range may
  2276.  
  2277.      program undefined keys in a terminal-dependent manner.  The
  2278.  
  2279.      differences among the capabilities are that pk causes press-
  2280.  
  2281.      ing the given key to be the same as the user typing the
  2282.  
  2283.      given string; pl causes the string to be executed by the
  2284.  
  2285.      terminal in local mode; and px causes the string to be
  2286.  
  2287.      transmitted to the computer.  Unfortunately, due to lack of
  2288.  
  2289.      a definition for string parameters in _✓t_✓e_✓r_✓m_✓c_✓a_✓p, only _✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o
  2290.  
  2291.      supports these capabilities.
  2292.  
  2293.  
  2294.  
  2295.      Glitches and Braindamage
  2296.  
  2297.  
  2298.  
  2299.      Hazeltine terminals, which do not allow `~' characters to be
  2300.  
  2301.      displayed, should indicate hz.
  2302.  
  2303.  
  2304.  
  2305.      The nc capability, now obsolete, formerly indicated
  2306.  
  2307.      Datamedia terminals, which echo \r \n for carriage return
  2308.  
  2309.      then ignore a following linefeed.
  2310.  
  2311.  
  2312.  
  2313.      Terminals that ignore a linefeed immediately after an am
  2314.  
  2315.      wrap, such as the Concept, should indicate xn.
  2316.  
  2317.  
  2318.  
  2319.      If ce is required to get rid of standout (instead of merely
  2320.  
  2321.      writing normal text on top of it), xs should be given.
  2322.  
  2323.  
  2324.  
  2325.      Teleray terminals, where tabs turn all characters moved over
  2326.  
  2327.      to blanks, should indicate xt (destructive tabs).    This
  2328.  
  2329.      glitch is also taken to mean that it is not possible to
  2330.  
  2331.      position the cursor on top of a "magic cookie", and that to
  2332.  
  2333.      erase standout mode it is necessary to use delete and insert
  2334.  
  2335.      line.
  2336.  
  2337.  
  2338.  
  2339.      The Beehive Superbee, which is unable to correctly transmit
  2340.  
  2341.      the ESC or ^C characters, has xb, indicating that the "f1"
  2342.  
  2343.      key is used for ESC and "f2" for ^C.  (Only certain Super-
  2344.  
  2345.      bees have this problem, depending on the ROM.)
  2346.  
  2347.  
  2348.  
  2349.      Other specific terminal problems may be corrected by adding
  2350.  
  2351.      more capabilities of the form x_✓x.
  2352.  
  2353.  
  2354.  
  2355.      Similar Terminals
  2356.  
  2357.  
  2358.  
  2359.      If there are two very similar terminals, one can be defined
  2360.  
  2361.      as being just like the other with certain exceptions.  The
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369. Printed 8/14/86          1 November 1985               18
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383. TERMCAP(5)        UNIX Programmer's Manual           TERMCAP(5)
  2384.  
  2385.  
  2386.  
  2387.  
  2388.  
  2389.  
  2390.  
  2391.      string capability tc can be given with the name of the simi-
  2392.  
  2393.      lar terminal.  This capability must be _✓l_✓a_✓s_✓t, and the com-
  2394.  
  2395.      bined length of the entries must not exceed 1024.    The capa-
  2396.  
  2397.      bilities given before tc override those in the terminal type
  2398.  
  2399.      invoked by tc.  A capability can be canceled by placing xx@
  2400.  
  2401.      to the left of the tc invocation, where _✓x_✓x is the capabil-
  2402.  
  2403.      ity.  For example, the entry
  2404.  
  2405.  
  2406.  
  2407.       hn|2621-nl:ks@:ke@:tc=2621:
  2408.  
  2409.  
  2410.  
  2411.      defines a "2621-nl" that does not have the ks or ke capabil-
  2412.  
  2413.      ities, hence does not turn on the function key labels when
  2414.  
  2415.      in visual mode.  This is useful for different modes for a
  2416.  
  2417.      terminal, or for different user preferences.
  2418.  
  2419.  
  2420.  
  2421. AUTHOR
  2422.  
  2423.      William Joy
  2424.  
  2425.      Mark Horton added underlining and keypad support
  2426.  
  2427.  
  2428.  
  2429. FILES
  2430.  
  2431.      /etc/termcap   file containing terminal descriptions
  2432.  
  2433.  
  2434.  
  2435. SEE ALSO
  2436.  
  2437.      ex(1), more(1), tset(1), ul(1), vi(1), curses(3X),
  2438.  
  2439.      printf(3S), term(7).
  2440.  
  2441.  
  2442.  
  2443. CAVEATS AND BUGS
  2444.  
  2445.      Note: _✓t_✓e_✓r_✓m_✓c_✓a_✓p was replaced by _✓t_✓e_✓r_✓m_✓i_✓n_✓f_✓o in UNIX System V
  2446.  
  2447.      Release 2.0.  The transition will be relatively painless if
  2448.  
  2449.      capabilities flagged as "obsolete" are avoided.
  2450.  
  2451.  
  2452.  
  2453.      Lines and columns are now stored by the kernel as well as in
  2454.  
  2455.      the termcap entry.  Most programs now use the kernel infor-
  2456.  
  2457.      mation primarily; the information in this file is used only
  2458.  
  2459.      if the kernel does not have any information.
  2460.  
  2461.  
  2462.  
  2463.      _✓V_✓i allows only 256 characters for string capabilities, and
  2464.  
  2465.      the routines in _✓t_✓e_✓r_✓m_✓l_✓i_✓b(3) do not check for overflow of this
  2466.  
  2467.      buffer.  The total length of a single entry (excluding only
  2468.  
  2469.      escaped newlines) may not exceed 1024.
  2470.  
  2471.  
  2472.  
  2473.      Not all programs support all entries.
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480.  
  2481.  
  2482.  
  2483.  
  2484.  
  2485.  
  2486.  
  2487.  
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501. Printed 8/14/86          1 November 1985               19
  2502.  
  2503.  
  2504.  
  2505.  
  2506.  
  2507.  
  2508.  
  2509.